package com.service;

import com.dao.UserDao;
import com.pojo.User;

import java.util.List;

public class UserService {
    private UserDao userDao = new UserDao();

    public void addUser(User user) {
        userDao.addUser(user);
    }

    public User searchByUnameAndPwd(String username, String password) {
        return userDao.searchByUnameAndPwd(username,password);
    }

    public List<User> searchAll() {
        return userDao.searchAll();
    }

    public void deleteUser(String username) {
        userDao.deleteUser(username);
    }
}
